package com.example.demo.zabbix.request.builder.request;

import com.example.demo.zabbix.request.BaseRequest;

import java.util.ArrayList;
import java.util.List;

public abstract class DeleteRequestBuilder extends RequestBuilder<List<String>> {
    public DeleteRequestBuilder(String method, String auth) {
        super(method, auth);
        baseRequest.setParams(new ArrayList<>());
    }

    public DeleteRequestBuilder(String method, Long id, String auth) {
        super(method, id, auth);
        baseRequest.setParams(new ArrayList<>());
    }

    @Override
    public BaseRequest<List<String>> builder() {
        return baseRequest;
    }

    public List<String> getIds() {
        return baseRequest.getParams();
    }

    public DeleteRequestBuilder addId(String id){
        this.baseRequest.getParams().add(id);
        return this;
    }

    public DeleteRequestBuilder setIds(List<String> ids) {
        this.baseRequest.getParams().addAll(ids);
        return this;
    }
}
